<!--
 * @Author: ckk
 * @Date: 2022-08-25 15:37:34
 * @LastEditors: ckk
 * @LastEditTime: 2022-08-31 16:43:16
 * @Description: 静态资源第六种版设
-->
<template>
  <div class="two-content" :style="{ marginTop: datas.pageMargin, marginBottom: datas.pageMargin }">
    <div
      class="content-item"
      v-for="(item, index) in datas.imageList"
      :key="index"
      @click="goOhter(item)"
      :style="{ borderRadius: datas.borderRadius + 'px' }">
      <p class="content-title">{{ item.text }}</p>
      <img :src="item.src" alt=""/>
    </div>
  </div>
</template>

<script>
export default {
  name: 'twoContent',
  props: {
    datas: Object
  },
  data () {
    return {};
  },
  methods: {
    goOhter (item) {
      this.$emit('goDetail', item);
    }
  }
};
</script>

<style scoped lang="scss">
.two-content {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  padding: 0 16px;
  justify-content: space-between;
  .content-item {
    width: 45%;
    height: 60px;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 10px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding:0 10px;
  }
  img {
    width: 42px;
    height: auto;
    flex-shrink: 0;
  }
}
.content-title {
  font-size: 14px;
  font-weight: 500;
  color: #333333;
  width:90%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
</style>
